A novel algorithm to determine the leaf (leaves) of a binary tree from its preorder and postorder traversals
نویسندگان
چکیده مقاله:
Binary trees are essential structures in Computer Science. The leaf (leaves) of a binary tree is one of the most significant aspects of it. In this study, we prove that the order of a leaf (leaves) of a binary tree is the same in the main tree traversals; preorder, inorder, and postorder. Then, we prove that given the preorder and postorder traversals of a binary tree, the leaf (leaves) of a binary tree can be determined. We present the algorithm BT-LEAF, a novel one, to detect the leaf (leaves) of a binary tree from its preorder and postorder traversals in quadratic time and linear space.
منابع مشابه
An improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملAn improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملwuthering heights and the concept of marality/a sociological study of the novel
to discuss my point, i have collected quite a number of articles, anthologies, and books about "wuthering heights" applying various ideas and theories to this fantastic story. hence, i have come to believe that gadamer and jauss are rightful when they claim that "the individaul human mind is the center and origin of all meaning," 3 that reading literature is a reader-oriented activity, that it ...
15 صفحه اولfrom linguistics to literature: a linguistic approach to the study of linguistic deviations in the turkish divan of shahriar
chapter i provides an overview of structural linguistics and touches upon the saussurean dichotomies with the final goal of exploring their relevance to the stylistic studies of literature. to provide evidence for the singificance of the study, chapter ii deals with the controversial issue of linguistics and literature, and presents opposing views which, at the same time, have been central to t...
15 صفحه اولConstructing a binary tree efficiently from its traversals
In this note we streamline an earlier algorithm for constructing a binary tree from its inorder and preorder traversals. The new algorithm is conceptually simpler than the earlier algorithms and its time complexity has a smaller constant factor.
متن کاملIterative Method for Recreating a Binary Tree from its Traversals
Many reconstruction algorithms for binary tree have been discussed in this paper. A particular focus of this paper is on “A new Non-Recursive Algorithm for Reconstructing a Binary Tree from its Traversals”. The computation time required for executing the reconstruction algorithm are O(N) and space complexity is O(NlogN) where N is the number of nodes in the binary tree. This algorithm works wel...
متن کاملمنابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ذخیره در منابع من قبلا به منابع من ذحیره شده{@ msg_add @}
عنوان ژورنال
دوره 49 شماره 2
صفحات 1- 11
تاریخ انتشار 2017-11-30
با دنبال کردن یک ژورنال هنگامی که شماره جدید این ژورنال منتشر می شود به شما از طریق ایمیل اطلاع داده می شود.
میزبانی شده توسط پلتفرم ابری doprax.com
copyright © 2015-2023